<?php
/**
* session apc处理类
*/
class SessionApc extends AbsSessionHandle {	
	public function __construct($cfg) {
		parent::__construct($cfg);
	}
	
	public function open($savepath, $name) {
		return TRUE;
	}
	
	public function close() {
		return TRUE;
	}
	
	public function read($id) {
		return (string)apc_fetch($id);
	}
	
	public function write($id, $sess_data) {
		return apc_store($id, $sess_data, $this->lifetime);
	}
	
	public function destroy($id) {
		return apc_delete($id);
	}
	
	public function gc($maxlifetime) {
		return TRUE;
	}
}
?>